ci: Version Packages#153
Merged
Merged
Conversation
ecc45e9 to
44f00fb
Compare
44f00fb to
5e17cb1
Compare
cursor Bot
pushed a commit
that referenced
this pull request
Jul 16, 2025
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@tanstack/db@0.0.6
Patch Changes
live query where clauses can now be a callback function that receives each row as a context object allowing full javascript access to the row data for filtering (#152)
the live query select clause can now be a callback function that receives each row as a context object returning a new object with the selected fields. This also allows the for the callback to make more expressive changes to the returned data. (#154)
This change introduces a more streamlined and intuitive API for handling mutations by allowing
onInsert,onUpdate, andonDeletehandlers to be defined directly on the collection configuration. (#156)When
collection.insert(),.update(), or.delete()are called outside of an explicit transaction (i.e., not withinuseOptimisticMutation), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change.Key changes:
@tanstack/db: TheCollectionclass now supportsonInsert,onUpdate, andonDeletein its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined.@tanstack/db-collections:queryCollectionOptionsnow accepts the new handlers and will automaticallyrefetchthe collection's query after a handler successfully completes. This behavior can be disabled if the handler returns{ refetch: false }.electricCollectionOptionsalso accepts the new handlers. These handlers are now required to return an object with a transaction ID ({ txid: string }). The collection then automatically waits for thistxidto be synced back before resolving the mutation, ensuring consistency.collection.insert(),.update(), or.delete()without being inside auseOptimisticMutationcallback and without a corresponding persistence handler (onInsert, etc.) configured on the collection will now throw an error.This new pattern simplifies the most common use cases, making the code more declarative. The
useOptimisticMutationhook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections.The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations.
README.mdanddocs/overview.mdfiles have been updated to de-emphasizeuseOptimisticMutationfor simple writes. They now showcase the much simpler API of callingcollection.insert()directly and defining persistence logic in the collection's configuration.examples/react/todo/src/App.tsx) has been completely overhauled. All instances ofuseOptimisticMutationhave been removed and replaced with the newonInsert,onUpdate, andonDeletehandlers, resulting in cleaner and more concise code.@tanstack/db-collections@0.0.8
Patch Changes
This change introduces a more streamlined and intuitive API for handling mutations by allowing
onInsert,onUpdate, andonDeletehandlers to be defined directly on the collection configuration. (#156)When
collection.insert(),.update(), or.delete()are called outside of an explicit transaction (i.e., not withinuseOptimisticMutation), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change.Key changes:
@tanstack/db: TheCollectionclass now supportsonInsert,onUpdate, andonDeletein its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined.@tanstack/db-collections:queryCollectionOptionsnow accepts the new handlers and will automaticallyrefetchthe collection's query after a handler successfully completes. This behavior can be disabled if the handler returns{ refetch: false }.electricCollectionOptionsalso accepts the new handlers. These handlers are now required to return an object with a transaction ID ({ txid: string }). The collection then automatically waits for thistxidto be synced back before resolving the mutation, ensuring consistency.collection.insert(),.update(), or.delete()without being inside auseOptimisticMutationcallback and without a corresponding persistence handler (onInsert, etc.) configured on the collection will now throw an error.This new pattern simplifies the most common use cases, making the code more declarative. The
useOptimisticMutationhook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections.The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations.
README.mdanddocs/overview.mdfiles have been updated to de-emphasizeuseOptimisticMutationfor simple writes. They now showcase the much simpler API of callingcollection.insert()directly and defining persistence logic in the collection's configuration.examples/react/todo/src/App.tsx) has been completely overhauled. All instances ofuseOptimisticMutationhave been removed and replaced with the newonInsert,onUpdate, andonDeletehandlers, resulting in cleaner and more concise code.Updated dependencies [
856be72,0455e27,80fdac7]:@tanstack/react-db@0.0.6
Patch Changes
856be72,0455e27,80fdac7]:@tanstack/vue-db@0.0.5
Patch Changes
856be72,0455e27,80fdac7]:@tanstack/db-example-react-todo@0.0.10
Patch Changes
This change introduces a more streamlined and intuitive API for handling mutations by allowing
onInsert,onUpdate, andonDeletehandlers to be defined directly on the collection configuration. (#156)When
collection.insert(),.update(), or.delete()are called outside of an explicit transaction (i.e., not withinuseOptimisticMutation), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change.Key changes:
@tanstack/db: TheCollectionclass now supportsonInsert,onUpdate, andonDeletein its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined.@tanstack/db-collections:queryCollectionOptionsnow accepts the new handlers and will automaticallyrefetchthe collection's query after a handler successfully completes. This behavior can be disabled if the handler returns{ refetch: false }.electricCollectionOptionsalso accepts the new handlers. These handlers are now required to return an object with a transaction ID ({ txid: string }). The collection then automatically waits for thistxidto be synced back before resolving the mutation, ensuring consistency.collection.insert(),.update(), or.delete()without being inside auseOptimisticMutationcallback and without a corresponding persistence handler (onInsert, etc.) configured on the collection will now throw an error.This new pattern simplifies the most common use cases, making the code more declarative. The
useOptimisticMutationhook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections.The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations.
README.mdanddocs/overview.mdfiles have been updated to de-emphasizeuseOptimisticMutationfor simple writes. They now showcase the much simpler API of callingcollection.insert()directly and defining persistence logic in the collection's configuration.examples/react/todo/src/App.tsx) has been completely overhauled. All instances ofuseOptimisticMutationhave been removed and replaced with the newonInsert,onUpdate, andonDeletehandlers, resulting in cleaner and more concise code.Updated dependencies [
80fdac7]: